/*
 * @Author: Bo Cai
 * @Mail: caibo0520@qq.com
 * @Date: 2021-11-20 14:39:30
 * @LastEditors: Bo Cai
 * @LastEditTime: 2021-12-04 16:19:54
 */
import request from '@/utils/request'

const base_url = '/api/qingdong/user_center'

export default {
  //根据邮箱发送验证码邮件
  sendVerificationCode(mailUrl) {
    return request({
      url: `/api/qingdong/user_center/send_email_verification_code_4_login?email=${mailUrl}`,
      method: 'get'
    })
  },
  // 登录的方法,获取token信息
  submitLogin(user) {
    return request({
      url: `${base_url}/login`,
      method: 'post',
      data: user
    })
  },
  // 根据token获取用户信息
  getLoginInfo(mobile) {
    return request({
      url: `${base_url}/get_user_info`,
      method: 'get'
    })
  },
}
